
//
//  HMEmotion.m
//  黑马微博-wzy
//
//  Created by Mac on 2017/2/13.
//  Copyright © 2017年 Mac. All rights reserved.
//

#import "HMEmotion.h"
#import "NSString+Emoji.h"


@implementation HMEmotion

- (NSString *)description
{
    
    NSString *str = [NSString stringWithFormat:@"%@ - %@ - %@", self.chs, self.png, self.code];
//    HMLog(@"%@", str);
    return str;
}

//判断传进来的表情 是图片还是emoji
//重写 code 的setter 方法
- (void)setCode:(NSString *)code{
    
    _code = [code copy];
    
    self.emoji = [NSString emojiWithStringCode:code];

}

@end
